﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="MyScouts.aspx.vb" Inherits="EagleTrackUI.MyScouts" %>
<%@ Register Assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.ListControls" tagprefix="ig" %>
<%@ Register Assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.GridControls" tagprefix="ig1" %>
<%@ Register Assembly="Infragistics4.WebUI.UltraWebNavigator.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebNavigator" tagprefix="ignav" %>
<%@ Register Assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.NavigationControls" tagprefix="ig" %>
 
<%@ Register Assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.DataSourceControls" tagprefix="ig" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script>

        function GetNewSubUnit() {

            hdnSubUnit.value =  prompt("Name of New Sub-Unit", "New Sub Unit");

        }



    
    </script>




    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
    <table class="style1">
        <tr>
            <td>

                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                  <asp:ListBox ID="lstScouts" runat="server" Width="176px" 
                    DataTextField="FullName" DataValueField="ScoutID" AutoPostBack="True"></asp:ListBox>
                </ContentTemplate>
                  
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="cmdSave" EventName="Click" />
                    </Triggers>
                  
                </asp:UpdatePanel>
            </td>
            <td>
              <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                <ContentTemplate>
                <table class="style1">
                    <tr>
                        <td>
                            Full Name</td>
                        <td>
                            <asp:TextBox ID="txtName" runat="server" Height="21px" Width="250px"></asp:TextBox>
                        </td>
                    </tr>
                       <tr>
                        <td>
                            EMail</td>
                        <td>
                            <asp:TextBox ID="txtEmail" runat="server" Height="21px" Width="250px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Unit</td>
                        <td>
                              <ig:WebDataTree ID="trvOrgs" runat="server" 
        DataSourceID="WebHierarchicalDataSource1" EnableConnectorLines="True" 
        EnableExpandOnClick="True" Height="300px" Width="200px" SelectionType="Single">
                        <AutoPostBackFlags SelectionChanged="On" />
        <DataBindings>
            <ig:DataTreeNodeBinding DataMember="SqlDataSource1_DefaultView" 
                TextField="OrganizationName" ValueField="OrganizationID" />
        </DataBindings>
    </ig:WebDataTree>
                        </td>
                    </tr>
                 
                  
                    <tr>
                        <td colspan="2">
                            <asp:CheckBox ID="chkDel" runat="server" Text="Delete Scout on Save" />
                        </td>
                    </tr>
                </table>
                </ContentTemplate>
            
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td>
             <asp:UpdatePanel ID="UpdatePanel2" runat="server">
             <ContentTemplate>        <asp:Button ID="cmdNew" runat="server" Text="Add Scout" />
              </ContentTemplate>   </asp:UpdatePanel>
        
            </td>
            <td style="text-align: right">
                <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                <ContentTemplate>  
                     
                    <asp:Button ID="cmdSave" runat="server" style="margin-left: 0px" Text="Save" 
                    Width="79px" /></ContentTemplate>
                </asp:UpdatePanel>
              <ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server">
        <DataViews>
            <ig:DataView ID="SqlDataSource1_DefaultView" DataMember="DefaultView" 
                DataSourceID="SqlDataSource1" />
        </DataViews>
        <DataRelations>
            <ig:DataRelation ChildColumns="ParentID" 
                ChildDataViewID="SqlDataSource1_DefaultView" ParentColumns="OrganizationID" 
                ParentDataViewID="SqlDataSource1_DefaultView" />
        </DataRelations>
    </ig:WebHierarchicalDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:EagleTrackUI.My.MySettings.AltDBConn %>" 
        SelectCommand="SELECT * FROM [Organizations]"></asp:SqlDataSource>
            </td>
        </tr>
    </table>
 
</asp:Content>
